package edu.ynu.se.xiecheng.achitectureclass.project.controller;

import edu.ynu.se.xiecheng.achitectureclass.project.service.CameraService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
//不通
@RestController
@RequestMapping("/api/data")
public class CameraController {
    @Autowired
    private CameraService cameraService;
//deviceSerial=L29334649
    @GetMapping("/camera/{deviceSerial}")
    public String getLatestPhotoUrl(@PathVariable String deviceSerial) {
        return cameraService.getLatestPhotoUrlByDeviceSerial(deviceSerial);
    }
}